package com.roadmap.entities;

import java.util.Date;

import com.roadmap.common.BaseConst;
import com.roadmap.common.BaseAuthEntity;
import com.roadmap.common.RdcResourceBundle;

public class LifeGoal extends BaseAuthEntity {
	// properties mapping to table
	private String aspirantId;
	private String name;
	private String content;
	private int priority;
	private int status;
	private Date scheduledEndDate;
	private Date scheduledStartDate;
	private Date realStartDate;
	private Date realEndDate;

	public LifeGoal() {
		this.status = BaseConst.LIFEGOAL_STATUS_SCHEDULED;
		this.priority = BaseConst.ENTITY_PRIORITY_LOW;
	}

	public String getAspirantId() {
		return aspirantId;
	}

	public void setAspirantId(String aspirantId) {
		this.aspirantId = aspirantId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		if (priority > 0 && priority < RdcResourceBundle.ENTITY_PRIORITY_DESCRIPTIONS.length) {
			this.priority = priority;
		}
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		if (status > 0 && status < RdcResourceBundle.LIFEGOAL_STATUS_DESCRIPTIONS.length) {
			this.status = status;
		}
	}

	public Date getScheduledEndDate() {
		return scheduledEndDate;
	}

	public void setScheduledEndDate(Date scheduledEndDate) {
		this.scheduledEndDate = scheduledEndDate;
	}

	public String getStatusDesc() {
		return RdcResourceBundle.LIFEGOAL_STATUS_DESCRIPTIONS[getStatus()];
	}

	public String getPriorityDesc() {
		return RdcResourceBundle.ENTITY_PRIORITY_DESCRIPTIONS[getPriority()];
	}

	public Date getScheduledStartDate() {
		return scheduledStartDate;
	}

	public void setScheduledStartDate(Date scheduledStartDate) {
		this.scheduledStartDate = scheduledStartDate;
	}

	public Date getRealStartDate() {
		return realStartDate;
	}

	public void setRealStartDate(Date realStartDate) {
		this.realStartDate = realStartDate;
	}

	public Date getRealEndDate() {
		return realEndDate;
	}

	public void setRealEndDate(Date realEndDate) {
		this.realEndDate = realEndDate;
	}

	@Override
	public String getWhatItIs() {
		return getName();
	}
	
}
